Student id: <%= @student.code%><br/>
Student name: <%= @student.name%><br/>
Student class: <%= @student.class_name%><br/>
<hr/>
<%= form_for @event,:url => {:controller => :events,:action => :create, :id => @student.id} do |f| %>
	<table>
	<tr>
	<td>Event date:</td><td><%= f.text_field :event_day %></td>
	</tr>
	<tr>
	<td>Content:</td><td><%= f.text_field :content %></td>
	</tr>
	<tr>
	<td>Comment:</td><td><%= f.text_field :comment %></td>
	</tr>
	<tr>
	<td><%= f.submit "Add new event"%></td>
	</tr>
	</table>
<% end %>
<hr/>
<h1>Event list: </h1>
<table border="1">
	<thead>
		<td>Event date</td>
		<td>Event Content</td>
		<td>Event Comment</td>
	</thead>
<% @events.each do |event| %>
	<tr>
		<td> <%= event.event_day %></td>
		<td> <%= event.content %></td>
		<td> <%= event.comment %></td>
	</tr>
<% end %>
</table>